#pragma once
#include "resource.h"
#include "ToyotaPJ.h"
#include "defs.h"

int GetDefaultExceptEcu(EcuSt **EcuInfoSt, tt_Token *Token);
int SystemExitPartEx(int a1, tt_Token *token);
unsigned __int16 GetDefaultExceptID(int a1, int a2, EcuSt **EcuInfoSt, tt_Token *token);
int GetEcuDetailInfo(EcuSt **ExceptEcuSt, int *a2, tt_Token *token);
int GetProtLinkLayer(int OffsetVal, int DataNum, tt_Token *token);
unsigned int GetCANBaundRate(int a1, EcuSt **EcuInfoSt, tt_Token *token);
unsigned __int16 FastKWPEnterMode(int a1, tt_Token *token);
int GetPhaseId(int OffsetVal, _BYTE *a2, tt_Token *token);
unsigned __int16 SystemEnterPart(tt_Token *token);
unsigned __int16 SystemEnterPartEx(int a1, tt_Token *a2);
unsigned __int16 ISOEnterMode(int a1, tt_Token *token);
unsigned int DESOEnterMode(int a1, tt_Token *token);
int SystemEnterAndExit(int OffsetVal, tt_Token *ttoken, unsigned __int8 Mode, int *BufSysEnte);
int CheckFunctionMenu(int a1, int SysIndex, tt_Token *token);
int CheckEcuFunc(int constNUm1, int constNUm2, int constNUm3, tt_Token *token, int *ID1);

unsigned __int16 SearchFuncDetailID(int tSysIndex, tt_Token *token, __int16 constNUm1, int constNum2);
int ToyotaOldVersionContent(tt_Token *token, unsigned __int8 *OldToken);
int j_move_lib_data_SYS_DATA(FILE*fp, int offset, void* SaveBuf, int readSize);
int EnterOBDMain(int, int, int);

int SelectEcuFunction(int OffsetVal, int SysIndex, EcuSt **ArrEcuInfo, tt_Token *token);
int GetSupportBit(int IndexVal, int ID1, int ID2, char *a4, int *a5, int ID3, int constNum, tt_Token *token);

int EcuFuncListDetailsTable(int IndexVal, int ID1, int *ID, EcuSt **EucInfo, tt_Token *token);
unsigned __int16 EcuFuncListAddInfoTable(int IndexVal, int a2, __int16 a3, int *a4, EcuSt **EcuInfo, tt_Token *token);
int SpecialFunc(tt_Token* token, unsigned char* goldtoken);
int ReadDTCFunc(tt_Token * token, unsigned __int8*goldToken);

int EraseDTCFunc(tt_Token *token, unsigned __int8 *goldToken);
int SystemSetLinkKeepFunc(tt_Token * token);
int ReadFreezeFunc(tt_Token * token, unsigned char* goldToken);
int ActuationTestFunc(tt_Token * token, unsigned char* goldToken);
int OBD_ClearDtc(int SysDtcIndex, tt_Token *goldToken);
int ReadDStreamFunc(tt_Token * token, unsigned char* goldToken);
int ReadDStreamFunc(tt_Token *token, unsigned __int8 *goldtoken);
int JudgeSpecFuncEexistCondition(tt_Token * token);

int GetShowSpecItem(SpecInfoSt *SpecBuf);